home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-07-10 | 4.4 KB | 131 lines | [TEXT/MPS ] |
- // project.r -- Rez-formatted structure definitions for test project
- // Copyright ©1992, David T. Roach, All Rights Reserved
- //
- // To build these resources and
- // modify your debugger prefs file directly, use
- // an MPW command line something like this:
- //
- // rez -o 'MacHD:System Folder:Debugger Prefs' -t rsrc -c RSED -a -p MacHD:MyProject:params.r
- //
- // or use the commando interface to invoke rez by typing:
- //
- // rez…
- //
- // or use the SARez (included with ThinkC 5) which is a standalone version of Rez
- //
-
- // INCLUDE the following four structures in any .r file using this technique
-
-
- // These are ResEdit templates which allow you to edit 'mxbm' and 'mxwt' resources
- // directly from ResEdit. If you only plan to use Rez or SARez for modifying Debugger
- // Prefs, then these are optional. Each creates a 'TMPL' resource which is inserted
- // into the Debugger Prefs file.
-
- data 'TMPL' (1000, "mxbm") {
- $"104E 756D 6265 7220 6F66 206D 6163 726F 734F 434E 5405 2A2A" /* .Number of macrosOCNT.** */
- $"2A2A 2A4C 5354 430A 4D61 6372 6F20 6E61 6D65 5053 5452 0945" /* ***LSTC.Macro namePSTRΔE */
- $"7870 616E 7369 6F6E 5053 5452 052A 2A2A 2A2A 4C53 5445" /* xpansionPSTR.*****LSTE */
- };
-
- data 'TMPL' (1001, "mxwt") {
- $"134E 756D 6265 7220 6F66 2074 656D 706C 6174 6573 4F43 4E54" /* .Number of templatesOCNT */
- $"052A 2A2A 2A2A 4C53 5443 0D54 656D 706C 6174 6520 6E61 6D65" /* .*****LSTC¬Template name */
- $"5053 5452 0A4E 756D 2066 6965 6C64 734F 434E 5405 2D2D 2D2D" /* PSTR.Num fieldsOCNT.---- */
- $"2D4C 5354 430A 4669 656C 6420 6E61 6D65 5053 5452 0954 7970" /* -LSTC.Field namePSTRΔTyp */
- $"6520 6E61 6D65 5053 5452 0543 6F75 6E74 4457 5244 052D 2D2D" /* e namePSTR.CountDWRD.--- */
- $"2D2D 4C53 5445 052A 2A2A 2A2A 4C53 5445" /* --LSTE.*****LSTE */
- };
-
- // 'mxwt' is a newer resource type for Macsbug
- // templates which uses a word count for
- // the number of fields in a type. The older
- // 'mxbt' type used a byte count. 'mxbt' is still
- // supported by Macsbug, but not by ResEdit
-
- // this is the Rez template for MacsBug 'mxwt' templates
- // it provides a definition of the 'mxwt' resource which Rez uses
- // when compiling your text file. This does not create a corresponding
- // resource in the Debugger Prefs file
-
- type 'mxwt'{
- integer = $$CountOf(templates);
- /* Number of templates */
- array templates { pString;
- /* Type name */
- integer = $$CountOf(fields); /* Number of fields in this template */
- array fields { pString; /* Field name */
- pString; /* Field type */
- integer; /* Number of fields of this type */
- };
- };
- };
-
-
- // this is the Rez template for MacsBug 'mxbm' macros.
- // it provides a definition of the 'mxbm' resource which Rez uses
- // when compiling your text file. This does not create a corresponding
- // resource in the Debugger Prefs file
-
- type 'mxbm'{
- integer = $$CountOf(symbols); /* Number of entries */
- array symbols { pString; pString; }; /* Macro name; expansion */
- };
-
-
- // PROJECT SPECIFIC DEFINES
-
- #define ArraySize1 3
- #define ArraySize2 2
-
- // PROJECT SPECIFIC STRUCTURES
-
- resource 'mxwt' (10000, "myProject") {
- {
- "AnotherStruct",
- {
- " m ", "Word", ArraySize2,
- };
-
-
- "OtherStruct",
- {
- " a ", "Boolean", 1,
- " b ", "Byte", 1,
- " c ", "Word", 1,
- " d ", "Long", 1,
- " e ", "pString", 256,
- " f ", "AnotherStruct",1,
- };
-
- "OtherStructPtr",
- {
- " o ", "^OtherStruct", 1,
- };
-
-
- "GlobStruct",
- {
- " id1 ", "Text", 4,
- " long_hex ", "Long", 1,
- " long_unsigned ", "UnsignedLong", 1,
- " long_signed ", "SignedLong", 1,
- " short_hex ", "Word", 1,
- " short_unsigned", "UnsignedWord", 1,
- " short_signed ", "SignedWord", 1,
- " byte_hex ", "Byte", 1,
- " bool ", "Boolean", 1,
- " other ", "OtherStructPtr", ArraySize1,
- " id2 ", "Text", 4,
- };
- }
- };
-
- resource 'mxbm' (10000, "project specific commands") {
- {
- "dump", "printf'Here it is:';dm GlobPtr ^GlobStruct", // use the minRec type we defined above
- }
- };
-
-
-